package dao;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import entities.Currency;
import entities.ExchangeRate;

public interface CrudService
{

	public void addExchangeRate(ExchangeRate exchange_rate);

	public void addExchangeRateList(List<ExchangeRate> exchange_rate_list);

	public void addCurrency(Currency currency);

	public void addCurrencyList(List<Currency> currency_list);

	public List<Currency> readAllCurrencies();

	public List<ExchangeRate> readAllExchangeRates();

	public List<ExchangeRate> readExchangeRates(String currency_code);

	public List<ExchangeRate> readExchangeRates(Date date);

	public ExchangeRate readExchangeRate(String currency_code, Date date);

	public List<ExchangeRate> readExchangeRates(String currency_code, Date from, Date to);

	public void updateExchangeRate(String currency_code, Date date, BigDecimal new_exchange_rate);

	public void deleteExchangeRate(String currency_code, Date date);

	public void deleteExchangeRates(String currency_code, Date from, Date to);

	public void deleteExchangeRates(Date from, Date to);

	public void deleteAllExchangeRates();

	public void deleteAllCurrencies();

	public void clearDataBase();

	public List<ExchangeRate> highestExchangeRates(String currency_code, int how_many);

	public List<String> topExchangeRate(Date from, Date to);

	public BigDecimal maxForExchangeRate(String currency_code, Date from, Date to);

	public BigDecimal minForExchangeRate(String currency_code, Date from, Date to);

	void updateExchangeRate(ExchangeRate exchange_rate);

	void deleteExchangeRate(ExchangeRate exchange_rate);

	Long countForGivenExchangeRate (BigDecimal rate, Date from, Date to);

	List<Currency> currenciesForGivenExchangeRate (BigDecimal rate, Date from, Date to);

}